3.1.33 \(\int \sec (c+d x) (a+a \sin (c+d x))^3 \, dx\) [33]

Optimal. Leaf size=52 \[ -\frac {4 a^3 \log (1-\sin (c+d x))}{d}-\frac {3 a^3 \sin (c+d x)}{d}-\frac {a^3 \sin ^2(c+d x)}{2 d} \]

[Out]

-4*a^3*ln(1-sin(d*x+c))/d-3*a^3*sin(d*x+c)/d-1/2*a^3*sin(d*x+c)^2/d

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {2746, 45} \begin {gather*} -\frac {a^3 \sin ^2(c+d x)}{2 d}-\frac {3 a^3 \sin (c+d x)}{d}-\frac {4 a^3 \log (1-\sin (c+d x))}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]*(a + a*Sin[c + d*x])^3,x]

[Out]

(-4*a^3*Log[1 - Sin[c + d*x]])/d - (3*a^3*Sin[c + d*x])/d - (a^3*Sin[c + d*x]^2)/(2*d)

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2746

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2, 0] && (GeQ[p, -1] ||  !IntegerQ[m + 1/2])

Rubi steps

\begin {align*} \int \sec (c+d x) (a+a \sin (c+d x))^3 \, dx &=\frac {a \text {Subst}\left (\int \frac {(a+x)^2}{a-x} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {a \text {Subst}\left (\int \left (-3 a+\frac {4 a^2}{a-x}-x\right ) \, dx,x,a \sin (c+d x)\right )}{d}\\ &=-\frac {4 a^3 \log (1-\sin (c+d x))}{d}-\frac {3 a^3 \sin (c+d x)}{d}-\frac {a^3 \sin ^2(c+d x)}{2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 41, normalized size = 0.79 \begin {gather*} \frac {a^3 \left (-4 \log (1-\sin (c+d x))-3 \sin (c+d x)-\frac {1}{2} \sin ^2(c+d x)\right )}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]*(a + a*Sin[c + d*x])^3,x]

[Out]

(a^3*(-4*Log[1 - Sin[c + d*x]] - 3*Sin[c + d*x] - Sin[c + d*x]^2/2))/d

________________________________________________________________________________________

Maple [A]
time = 0.13, size = 88, normalized size = 1.69

method result size
derivativedivides \(\frac {a^{3} \left (-\frac {\left (\sin ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )+3 a^{3} \left (-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )-3 a^{3} \ln \left (\cos \left (d x +c \right )\right )+a^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) \(88\)
default \(\frac {a^{3} \left (-\frac {\left (\sin ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )+3 a^{3} \left (-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )-3 a^{3} \ln \left (\cos \left (d x +c \right )\right )+a^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}\) \(88\)
risch \(4 i a^{3} x +\frac {3 i a^{3} {\mathrm e}^{i \left (d x +c \right )}}{2 d}-\frac {3 i a^{3} {\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {8 i a^{3} c}{d}-\frac {8 a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}+\frac {a^{3} \cos \left (2 d x +2 c \right )}{4 d}\) \(93\)
norman \(\frac {-\frac {6 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {12 a^{3} \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {6 a^{3} \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 a^{3} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 a^{3} \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}-\frac {8 a^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}+\frac {4 a^{3} \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}\) \(154\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)*(a+a*sin(d*x+c))^3,x,method=_RETURNVERBOSE)

[Out]

1/d*(a^3*(-1/2*sin(d*x+c)^2-ln(cos(d*x+c)))+3*a^3*(-sin(d*x+c)+ln(sec(d*x+c)+tan(d*x+c)))-3*a^3*ln(cos(d*x+c))
+a^3*ln(sec(d*x+c)+tan(d*x+c)))

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 43, normalized size = 0.83 \begin {gather*} -\frac {a^{3} \sin \left (d x + c\right )^{2} + 8 \, a^{3} \log \left (\sin \left (d x + c\right ) - 1\right ) + 6 \, a^{3} \sin \left (d x + c\right )}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+a*sin(d*x+c))^3,x, algorithm="maxima")

[Out]

-1/2*(a^3*sin(d*x + c)^2 + 8*a^3*log(sin(d*x + c) - 1) + 6*a^3*sin(d*x + c))/d

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 45, normalized size = 0.87 \begin {gather*} \frac {a^{3} \cos \left (d x + c\right )^{2} - 8 \, a^{3} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 6 \, a^{3} \sin \left (d x + c\right )}{2 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+a*sin(d*x+c))^3,x, algorithm="fricas")

[Out]

1/2*(a^3*cos(d*x + c)^2 - 8*a^3*log(-sin(d*x + c) + 1) - 6*a^3*sin(d*x + c))/d

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a^{3} \left (\int 3 \sin {\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int 3 \sin ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \sin ^{3}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \sec {\left (c + d x \right )}\, dx\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+a*sin(d*x+c))**3,x)

[Out]

a**3*(Integral(3*sin(c + d*x)*sec(c + d*x), x) + Integral(3*sin(c + d*x)**2*sec(c + d*x), x) + Integral(sin(c
+ d*x)**3*sec(c + d*x), x) + Integral(sec(c + d*x), x))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 128 vs. \(2 (50) = 100\).
time = 6.24, size = 128, normalized size = 2.46 \begin {gather*} \frac {2 \, {\left (2 \, a^{3} \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right ) - 4 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {3 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 3 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 7 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 3 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, a^{3}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2}}\right )}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)*(a+a*sin(d*x+c))^3,x, algorithm="giac")

[Out]

2*(2*a^3*log(tan(1/2*d*x + 1/2*c)^2 + 1) - 4*a^3*log(abs(tan(1/2*d*x + 1/2*c) - 1)) - (3*a^3*tan(1/2*d*x + 1/2
*c)^4 + 3*a^3*tan(1/2*d*x + 1/2*c)^3 + 7*a^3*tan(1/2*d*x + 1/2*c)^2 + 3*a^3*tan(1/2*d*x + 1/2*c) + 3*a^3)/(tan
(1/2*d*x + 1/2*c)^2 + 1)^2)/d

________________________________________________________________________________________

Mupad [B]
time = 0.05, size = 36, normalized size = 0.69 \begin {gather*} -\frac {a^3\,\left (8\,\ln \left (\sin \left (c+d\,x\right )-1\right )+6\,\sin \left (c+d\,x\right )+{\sin \left (c+d\,x\right )}^2\right )}{2\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*sin(c + d*x))^3/cos(c + d*x),x)

[Out]

-(a^3*(8*log(sin(c + d*x) - 1) + 6*sin(c + d*x) + sin(c + d*x)^2))/(2*d)

________________________________________________________________________________________